package com.xky.rabbitmq.controller;

import com.rabbitmq.client.impl.VariableLinkedBlockingQueue;
import com.xky.rabbitmq.component.AmqpComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author keying.xia
 * @date 2017/12/8
 */
@RestController
@RequestMapping(value = "/rabbit")
public class Controller {

    @Autowired
    private AmqpComponent amqpComponent;

    @GetMapping(value = "hello")
    public String hello(){
        return "hello";
    }

    @GetMapping(value = "send")
    public void Send(){
        amqpComponent.send("xky");
    }


}
